<template>
    <div>
        <el-container>
            <el-main>
                <p class="text-center  my-3">
                <h4 class="text-center font-bold text-xl">{{ form.title }}</h4>
                </p>
                <div class="text-center ">
                    <span class="text-sm text-gray-600">{{ form.description }}</span>
                    <span class="text-sm text-gray-500 mx-2">时间：{{ form.created_at | dateFormat }}</span>
                </div>
                <div class="mt-3" v-html="form.content"></div>
            </el-main>

        </el-container>

    </div>
</template>

<script>
export default {
    route: {path: 'admin/content/:id/show'},
    data() {
        return {
            form: {},
            id: this.$route.params.id
        };
    },
    async created() {
        this.form = await axios.get(`admin/content/${this.id}`)
    }
}
</script>

<style scoped>
.my-medium {
    background: #E1F3D8;
}

.my-content {
    background: #FDE2E2;
}
</style>
